Skip to content

feat: storyboard UX, inline agent connect, OAuth auth#1998

Open
bokelley wants to merge 6 commits intomainfrom
bokelley/storyboard-fixes
Open

feat: storyboard UX, inline agent connect, OAuth auth#1998
bokelley wants to merge 6 commits intomainfrom
bokelley/storyboard-fixes

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented Apr 8, 2026

Summary

  • Short-circuit comply() when product discovery fails — skip dependent tracks instead of running 10+ scenarios to the same error
  • Inline agent connection form on dashboard — replace chat bounce with token input, auth type, platform type
  • Filter storyboard picker by agent capabilities — recommended vs other grouping
  • New generative creative storyboard (creative_generative.yaml) for brief-driven generation (OpenAds pattern)
  • OAuth fallback in resolveOwnerAuth() — uses OAuth tokens when no static bearer token exists
  • Auto-scroll storyboard results into view

Alignment with #1985

These changes are compatible with #1985 (storyboard coverage and comply() scenario filtering). The overlap is in compliance-testing.ts#1985 adds extractScenariosFromStoryboard() and scenario filtering in the run endpoint, while this PR adds two-phase comply() execution. They compose cleanly: filtered scenarios still flow through the two-phase comply(). Merge order doesn't matter; the second to merge will need a small conflict resolution in compliance-testing.ts.

Changes

comply() short-circuit (compliance-testing.ts)

  • Runs core + products tracks first (phase 1)
  • If products track fails, skips all product-dependent tracks (phase 2)
  • Adds clear observation: "Product discovery failed — skipped dependent tracks"

Inline agent connect (registry-api.ts + dashboard-agents.html)

  • PUT /registry/agents/:encodedUrl/connect — saves auth token + platform type
  • Inline form replaces "Connect agent" chat link
  • Works for both "not yet checked" and "has data but no auth" states

Storyboard picker filtering (dashboard-agents.html)

  • Uses agent track data to sort storyboards into Recommended / Other
  • Media buy storyboards for media_buy agents, creative for creative, signal for signal

Generative creative storyboard (creative_generative.yaml)

  • 5 phases: format discovery → generate from brief → refine → multi-format → production build
  • interaction_model: stateless_generate, capabilities: [supports_generation]

OAuth in resolveOwnerAuth() (compliance-db.ts)

  • Falls back to OAuth access tokens when no static token exists
  • Respects 5-minute expiration buffer

Test plan

  • 607 unit tests pass (pre-commit hook)
  • 1329 server unit tests pass
  • 43 storyboard tests pass (12 storyboards load)
  • TypeScript compiles clean
  • Pre-push hooks pass (Mintlify validation, link checking)
  • CI passes

🤖 Generated with Claude Code

bokelley and others added 2 commits April 8, 2026 07:43
Short-circuit comply() when product discovery fails — skip dependent
tracks instead of repeating the same error across 10+ scenarios. Saves
significant time for agents with broken product schemas.

Add inline agent connection form to dashboard — replaces the chat bounce
for saving auth tokens and platform type. New PUT /registry/agents/:url/connect
endpoint handles token storage directly.

Filter storyboard picker by agent capabilities — groups into Recommended
and Other based on the agent's compliance tracks. Signal storyboards show
for signal agents, creative for creative agents, etc.

Add creative_generative.yaml storyboard — covers the brief-driven
generation flow (OpenAds, generative DSPs) with 5 phases: format
discovery, generate from brief, refine, multi-format, production build.

Fix resolveOwnerAuth() to fall back to OAuth tokens when no static
bearer token exists, with 5-minute expiration buffer.

Auto-scroll storyboard results into view after rendering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bokelley and others added 2 commits April 8, 2026 07:53
- Add max-length validation (4096) on auth_token input
- Validate auth_type against allowed values instead of silent fallback
- Validate platform_type is a string before set membership check
- Combine ownership verification and org lookup into single query
- Log warning when OAuth token has no expiration recorded
- Preserve agentTracks context through storyboard back button navigation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor Author

@bokelley bokelley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work — the two-phase comply() short-circuit is a good optimization, and the inline agent connect + storyboard picker are solid UX improvements.

Merge order with #1985: We're merging #1985 first (storyboard coverage + comply() migration). The main conflict will be in comply() in compliance-testing.ts. Here's how they compose:

#1985 adds a priority chain at the top of comply():

storyboards > scenarios > tracks > default

When storyboards or scenarios are provided, they bypass track-based selection entirely. Your two-phase logic applies to the track-based path (the else branch — when no storyboards or explicit scenarios are given).

When you rebase after #1985 merges, the reconciliation is:

  1. Keep the priority chain from #1985 (storyboards → scenarios → tracks)
  2. Apply your two-phase logic inside the track-based branch
  3. The scenarioList variable from #1985 feeds into your phase 1/phase 2 split

The storyboard path doesn't need two-phase execution because storyboards already select only relevant scenarios — if a storyboard doesn't reference full_sales_flow, products aren't tested.

Other notes:

  • creative_generative.yaml fills the gap we noticed — the category existed in schema.yaml but had no storyboard
  • #1985 adds creative_generative to the schema.yaml category enum already, so that should merge cleanly
  • The SCENARIO_REQUIREMENTS import you add is already available in #1985's version of the file

Integrates scenario filtering from #1985 with two-phase comply():
- Phase 1 filters scenarios to foundation tracks only
- Phase 2 filters to remaining tracks
- Both respect the storyboard-specific scenario list when provided

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
}

// Replace the form with a success message and reload after a moment
const card = form.closest('.agent-compliance-card');
The two-phase approach (run core+products first, then skip dependent
tracks) is no longer needed: #1985's scenario filtering already limits
comply() to only the scenarios a storyboard references, and @adcp/client's
storyboard runner will handle step-by-step short-circuiting.

Remove isTrackProductDependent(), foundation/remaining track splitting,
and the product-availability check. comply() now runs all requested
scenarios in a single testAllScenarios() call.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant